<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateSellcarsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('sellcars', function (Blueprint $table) {
            $table->increments('s_id');
            $table->integer('c_id');
            $table->string('p_contact_name',64);
            $table->string('p_contact_tel',32);
            $table->integer('p_brand');
            $table->integer('p_subbrand');
            $table->integer('p_subsubbrand');
            $table->string('p_name',30);
            $table->string('p_allname',50);
            $table->string('p_keyword',200);
            $table->string('p_color',10);
            $table->string('p_country',30);
            $table->string('p_transmission',10);
            $table->integer('p_year');
            $table->string('p_details',512);
            $table->integer('p_model');
            $table->integer('p_addtime');
            $table->string('p_pics',512);
            $table->string('p_mainpic',100);
            $table->integer('p_month');
            $table->string('p_gas',10);
            $table->decimal('p_price',8,2);
            $table->decimal('p_kilometre',8,2);
            $table->integer('p_reply_times');
            $table->string('p_reply_info');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('sellcars');
    }
}
